package com.tho.ccolor;

public class PointHSV implements Comparable<PointHSV>{
	public int x;
	public int y;
	public ColorHSV colorHSV;
	public float distance;
	public PointHSV(int x, int y, ColorHSV colorHSV) {
		super();
		this.x = x;
		this.y = y;
		this.colorHSV = colorHSV;
	}
	public PointHSV(int x, int y, ColorHSV colorHSV, float distance) {
		super();
		this.x = x;
		this.y = y;
		this.colorHSV = colorHSV;
		this.distance = distance;
	}
	
	public int getX() {
		return x;
	}
	public void setX(int x) {
		this.x = x;
	}
	public int getY() {
		return y;
	}
	public void setY(int y) {
		this.y = y;
	}
	public ColorHSV getColorHSV() {
		return colorHSV;
	}
	public void setColorHSV(ColorHSV colorHSV) {
		this.colorHSV = colorHSV;
	}
	//there is no equals!
	@Override
	public int compareTo(PointHSV another) {
		if (distance > another.distance){
			return 1;
		}else if (distance <= another.distance){
			return -1;
		}
		return -1;
	}
	public String toString(){
		return "" + x + "," + y + "," + distance;
	}
}
